﻿<%@ Page Language="C#" MasterPageFile="~/NewMasterPage.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="static/js/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
    <link href="static/js/css/redmond/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function () {

            $("#message").dialog({
                width: 500,
                modal: true,
                autoOpen: false,
                buttons: {
                    "Close": function () {
                        $(this).dialog("close");
                    }
                },
                open: function (type, data) {
                    $(this).parent().appendTo("form");
                }
            });

        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMain" runat="Server">
    <div class="mbox">
        <h1>
            <a>收到的文档</a></h1>
        <div class="text">
            <asp:GridView ID="gvSharedDocuments" runat="server" CellPadding="4" ForeColor="#333333"
                GridLines="Vertical" OnRowCommand="gvSharedDocuments_RowCommand" Width="100%"
                AutoGenerateColumns="False" ShowHeaderWhenEmpty="True">
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                                                <a href="javascript:window.open( 'viewdocument.aspx?doc=<%# Eval("Document_Code") %>', null, 'status=yes,toolbar=no,menubar=no,location=no ');"  >查看</a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="SharedName" HeaderText="来自" />
                    <asp:BoundField DataField="Shared_Date" HeaderText="日期" />
                    <asp:BoundField DataField="Share_Comment" HeaderText="备注" />
                </Columns>
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#999999" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
        </div>
        <div class="footer">
            <a href="#">删除</a> | <a href="#">未读 (30)</a>
        </div>
    </div>
    <div class="mbox">
        <h1>
            <a href="MyDrafts.aspx">负责的文档</a></h1>
        <div class="text">
            <asp:GridView ID="gvUploadedDocs" runat="server" CellPadding="4" ForeColor="#333333"
                GridLines="Vertical" Width="100%" OnRowCommand="gvUploadedDocs_RowCommand" AutoGenerateColumns="False" ShowHeaderWhenEmpty="True">
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <Columns>
                    <asp:TemplateField HeaderText="名称/备注">
                        <ItemTemplate>
                            <strong>
                                            <asp:LinkButton ID="Button1" runat="server"
                                                CommandName="Download" CommandArgument='<%# Eval("Document_Code") %>' Text='<%#Eval("Document_Name")%>' /></strong>
                            <br />
                            <span>
                                <%#Eval("Document_Desc")%></span>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="小项/分项">
                        <ItemTemplate>
                            <strong>
                                <%#Eval("TaskName")%></strong>
                            <br />
                            <span>
                                <%#Eval("FolderName")%></span>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="Updation_Date" HeaderText="更新时间" />
                </Columns>
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#999999" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
        </div>
        <div class="footer">
            <div class="bookmarks">
                <a href="UploadDocument.aspx">上传文件</a>
            </div>
        </div>
    </div>
    <div class="mbox">
        <h1>
            <a href="MyDrafts.aspx">收到的消息<asp:Label ID="lblMsgCount" runat="server"></asp:Label>
            </a>
        </h1>
        <div class="text">
            <asp:GridView ID="gvInbox" runat="server" AutoGenerateColumns="False" CellPadding="4"
                ForeColor="#333333" GridLines="Vertical" Width="100%">
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <Columns>
                    <asp:BoundField DataField="User_Code" HeaderText="来自" />
                    <asp:BoundField DataField="Message_Subject" HeaderText="标题" />
                    <asp:TemplateField>
                        <ItemTemplate>
                            <a id="lnk" onclick="$('#<%=hdfItemCode.ClientID %>').val('<%# Eval("Message_Code") %>');$('#message').dialog('open');"
                                title="Open">查看</a>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#999999" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
            <asp:HiddenField ID="hdfItemCode" runat="server" />
            <div id="message" title="Message">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
                    <ContentTemplate>
                        <table border="0">
                            <tr>
                                <td>
                                </td>
                                <td>
                                    <asp:Button ID="btnLoadMessage" runat="server" Text="Load Message" OnClick="btnLoadMessage_Click" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    来自:&nbsp;
                                </td>
                                <td>
                                    <asp:Label ID="lblFrm" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    标题:&nbsp;
                                </td>
                                <td>
                                    <asp:Label ID="lblSubj" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    内容:&nbsp;
                                </td>
                                <td>
                                    <asp:Literal ID="lblBody" runat="server"></asp:Literal>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    附件:&nbsp;
                                </td>
                                <td>
                                    <asp:Label ID="Label3" runat="server" Text="没有附件"></asp:Label>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
        </div>
        <div class="footer">
            <%--<div class="bookmarks">
                <a href="Compose.aspx">Create a message</a>
            </div>
            <a href="#">Delete</a> | <a href="#">Unread (30)</a>--%>
        </div>
    </div>
    <div class="mbox">
        <h1>
            <a href="ProjectTasks.aspx">具体业务</a></h1>
        <div class="text">
            <p>
                
            </p>
        </div>
        <div class="footer">
            <%--<div class="bookmarks">
                <a href="#" target="_blank">Pick a Task</a>
            </div>
            <a href="ProjectTasks.aspx">Project Tasks</a> | <a href="#">Closed (30)</a>--%>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphSide" runat="Server">
    <div class="widget">
        <h4>
            日历</h4>
        <div class="content">
            <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
        </div>
    </div>
    <div class="widget">
        <h4>
            业务分类</h4>
        <div class="content">
            <ul>
                <asp:DataList ID="lsvProjects" runat="server" >
                    <ItemTemplate>
                        <li><a href="Project.aspx?dept=<%=Author.department_Code %>&proj=<%# Eval("Project_Code")  %>">
                            <img src="static/images/Open Folder 128x128.png" width="16px" alt="Folder" />
                            <%# Eval("Project_Title") %></a></li>
                        </li>
                    </ItemTemplate>
                </asp:DataList>
            </ul>
        </div>
        <div class="footer">
            <%--<div class="bookmarks">
                <a href="MyProjects.aspx">View All</a>
            </div>
            <a title="Delete" href="#">Delete</a>--%>
        </div>
    </div>
    <div class="widget">
        <h4>
            </h4>
        <div class="content">
            <ul>
                <asp:DataList ID="lsvTasks" runat="server" >
                    <ItemTemplate>
                        <li><a href="Task.aspx?dept=<%=Author.department_Code %>&task=<%# Eval("Task_Code")  %>">
                            <img src="static/images/Open Folder 128x128.png" width="16px" alt="Folder" />
                            <%# Eval("Task_Title") %></a></li>
                    </ItemTemplate>
                </asp:DataList>
            </ul>
        </div>
        <div class="footer">
            <%--<div class="bookmarks">
                <a href="AddFolder.aspx">New Folder</a>
            </div>
            <a title="Delete" href="#">Delete</a>--%>
        </div>
    </div>
</asp:Content>
